<?php
return array(
	'attributeLabels' => array(
		'name' => '名称',
		'link' => '链接地址',
		'image' => '图片',
		'sort' => '排序',
		'cate' => '位置',
		'open_type' => '打开方式',
		'thumb' => '缩略图',
		'desc' => '描述',
	),
	
	'attributeHints' => array(
		'thumb' => '例如商城首页轮播，就需要显示相关的缩略图',
	),
	
	'rules' => array(
		array('link,image,cate,name,open_type','required'),
		array('link','url'),
		array('sort','numerical','integerOnly'=>true,'max'=>100),
		array(
			'image, thumb', 'file',
			'allowEmpty' => true,
			'types'=>'jpg, gif, png',
			'maxSize'=>1024*1024*500,
			'tooLarge'=>'上传文件超过500KB，无法上传。'
		),
	),
	
	'behaviors' => array(
		'fileSaver' => array(
			'class' => 'lib.behaviors.ar.CFileSaveBehavior',
			'baseUrl' => Yii::app()->baseUrl . '/uploaded',
			'basePath' => dirname(Yii::app()->basePath) . '/uploaded',
			'attributes' => array('image', 'thumb'),
		),
	),
	
	'_import' => array(
		array('*', 'models.ActiveRecord//*'),
	),
);
